package cl.crabcom.shoppinglist;

import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;


public class ShowList extends ListActivity{

	 public void onCreate(Bundle savedInstanceState) {
			
			super.onCreate(savedInstanceState);
		}

		@Override
		public boolean onCreateOptionsMenu(Menu menu) {
			
			super.onCreateOptionsMenu(menu);
			MenuInflater inflater = getMenuInflater();
			inflater.inflate(R.menu.menu_showlist, menu);
			return true;
		}	
		
		@Override
		public boolean onOptionsItemSelected(MenuItem item) {
			
			switch (item.getItemId()) {
			
				case R.id.new_list:
					startActivity(new Intent(this, NewList.class));
					return true;
			}
			return false;
		}
}
